<template>
  <div class="victory-container">
    <div class="victory-content">
      <!-- 胜利图标 -->
      <div class="victory-icon">
        🎉
      </div>
      
      <!-- 胜利标题 -->
      <h1 class="title">胜利！</h1>
      
      <!-- 得分展示 -->
      <div class="score-display">
        <span class="label">得分：</span>
        <span class="value">{{ score }}</span>
      </div>
      
      <!-- 操作按钮 -->
      <div class="button-group">
        <button 
          class="btn retry-btn"
          @click="$emit('retry')"
        >
          再玩一次
        </button>
        
        <button 
          class="btn menu-btn"
          @click="$emit('main-menu')"
        >
          返回主菜单
        </button>
      </div>
    </div>
  </div>
</template>

<script setup>
defineProps({
  score: {
    type: Number,
    required: true
  }
})

defineEmits(['retry', 'main-menu'])
</script>

<style scoped>
.victory-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #4CAF50 40%, #81C784 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  backdrop-filter: blur(2px);
}

.victory-content {
  background: rgba(255, 255, 255, 0.95);
  padding: 40px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.victory-icon {
  font-size: 64px;
  margin-bottom: 20px;
  color: #2E7D32;
}

.title {
  font-size: 36px;
  margin-bottom: 30px;
  color: #2E7D32;
}

.score-display {
  margin: 20px 0;
  font-size: 24px;
}

.label {
  color: #555;
}

.value {
  color: #2E7D32;
  font-weight: bold;
}

.button-group {
  margin-top: 40px;
}

.btn {
  margin: 10px;
  padding: 12px 24px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.retry-btn {
  background: #2E7D32;
  color: white;
}

.retry-btn:hover {
  background: #388E3C;
  transform: translateY(-2px);
}

.menu-btn {
  background: #81C784;
  color: #2E7D32;
  border: 2px solid #2E7D32;
}

.menu-btn:hover {
  background: #A5D6A7;
  transform: translateY(-2px);
}
</style>